﻿using System.Collections.Generic;
using KDGAPI = KDSugar.Galaxy.API;

namespace KDSG.API.TestCase
{
    public class TestCall
    {
        public void TestOparate()
        {
            var apiClient = new KDGAPI.GalaxyCloudAPIClient("http://192.168.86.128/k3cloud",
                "62654a94c89620", "Administrator", "888888");
            var loginResult = apiClient.Login();
            if (apiClient.IsLogin)
            {
                KDGAPI.Query.QueryCommand<Query.QueryModel> queryCommand =
                    new KDGAPI.Query.QueryCommand<Query.QueryModel>(apiClient);
                //通过SetFilter筛选字段条件
                //queryCommand.SetFilter(m => m.Id >= 104960 ||
                //    (m.Id < 104960 && m.Number == "CK002"));
                //通过AppendOrderBy确定输出的字段顺序
                //queryCommand.AppendOrderBy(m => m.Id, KDGAPI.Constant.OrderTypeEnum.Desc);
                List<Query.QueryModel> resultObj = queryCommand.ExecuteQueryBill();
            }
        }
    }
}
